<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>个人配置</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="../css/pepper-grinder/jquery-ui-1.8.16.custom.css" />
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="../js/jquery.ui.datepicker-zh-CN.js"></script>
	<script type="text/javascript" src="../js/jquery.mousewheel.min.js"></script>
	<script type="text/javascript" src="../js/popeScroll.js"></script>
	<script language="JavaScript" type="text/JavaScript">
		var userJson;
		
		$(document).ready(function() {
			$(window).resize(function() {
				refresh();
			});
			refresh();	
			
			$( "#birthdate" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat:"yy-mm-dd",
				yearRange:"1900:2015"
			});
			$( "#birthdate" ).datepicker( "option",$.datepicker.regional["zh-CN"]);		
			
			$.getJSON("account_getUser.do",null,function(json){
				userJson = json;	
				$("#realName").val(userJson.realName);
				$("#sex").val(userJson.sex);
				$("#birthdate").val(userJson.birthdate);
				$("#mobile").val(userJson.mobile);
				$("#email").val(userJson.email);
				$("#address").val(userJson.address);
			});
		});

		function refresh(){
			var winheight = $(window).height();
			var winwidth = $(window).width();
			$("#bodydiv").css("height",winheight);
			
		}

		function saveForm(){
			var realName = $("#realName").val();
			var sex = $("#sex").val();
			var birthdate = $("#birthdate").val();
			var mobile = $("#mobile").val();
			var email = $("#email").val();
			var address = $("#address").val();
		
		
			$.get("account_editInfo.do",{id:userJson.id,realName:realName,sex:sex,birthdate:birthdate,mobile:mobile,email:email,address:address},function(data){
					
					if(data=="success"){
						alert("修改成功");
						window.parent.modifyPersonInfo();
					}
			
			});
		}

		
		
	</script>
</head>
<body style="background-color=transparent;width:100%;margin-left:0px;margin-top:0px;">
	<div id="bodydiv" style="background:url(../image/bg/16.png);color:#fff;">
		<div style="width:100%;height:160px;float:left;color:#fff;font-size:12px;line-height:22px;padding-top:25px;">
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">真实姓名：</div>
				<div style="width:180px;float:left;"><input type="text" id="realName" /></div>
				
			</div>
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">性    别：</div>
				<div style="width:180px;float:left;"><select id="sex"><option value="男">男</option><option value="女">女</option></select></div>
				
			</div>
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">生日：</div>
				<div style="width:180px;float:left;"><input type="text" id="birthdate" /></div>
				
			</div>
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">移动电话：</div>
				<div style="width:180px;float:left;"><input type="text" id="mobile" /></div>
				
			</div>
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">电子邮件：</div>
				<div style="width:180px;float:left;"><input type="text" id="email" /></div>
				
			</div>
			<div style="float:left;width:100%;padding-top:15px;">
				<div style="width:120px;float:left;text-align:right;">常用地址：</div>
				<div style="width:180px;float:left;"><input type="text" id="address" /></div>
				
			</div>
			
			<div style="text-align:center;float:left;width:100%;padding-top:18px;" >
				<img onclick="saveForm();" title="保存" src="../image/cover/system/white/MB_0008_save.png" style="width:24px;height:24px;cursor:pointer;" />
				
			</div>
			
		</div>
		
	</div>
	
	
	
</body>
</html>